const loaderUtils = require('loader-utils');

function styleLoader(){}

styleLoader.pitch = function(request){
  // "!!../../loaders/css-loader.js!../../loaders/less-loader.js!./index.less"
  let str = `
    let style = document.createElement('style');
    style.innerHTML = require(${loaderUtils.stringifyRequest(this, '!!' + request)});
    document.head.appendChild(style);
  `
  return str;
}

module.exports = styleLoader;